<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/V_small_order_item.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/V_small_order_item.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '订单明细报表（含客房）',
                    name: 'V_small_order_item',
                    url: "/VSmallOrderItems/",
                    sortName: "order_number",
                    paginationSize: 99999999,
                    paginationHide: true,
                },
                extend: extend,
                editFormFields: {},
                editFormOptions: [],
                searchFormFields: {"title":"","playStartDate":"","order_number":"","bookingPhone":"","createDate":"","status":"","distributorCode":"","external_order_number1":"","supplierCode":"","type":"","takeTime":"",pay_type:"", type: ""},
                searchFormOptions: [
                    [{"title":"订单号","field":"order_number","type":"like"},{"title":"商品名称","field":"title","type":"like"},{"title":"创建时间","field":"createDate","type":"datetime"}],
                    [{"title":"预订手机号","field":"bookingPhone","type":"like"},{"dataKey":"order_shop","data":[],"title":"票状态","field":"status","type":"select"},{"dataKey":"distributorList","data":[],"title":"分销商名称","field":"distributorCode","type":"select"}],
                    [{"title":"游玩时间","field":"playStartDate","type":"datetime"},{"title":"退款时间","field":"refundOfTime","type":"datetime"},{"title":"退款原因","field":"spare4","type":"like"}],
                    [{"title":"外部订单号","field":"external_order_number1","type":"like"},{"dataKey":"mall_supplier","data":[],"title":"供应商名称","field":"supplierCode","type":"select"}, { title: '使用日期', field: 'takeTime', type: 'datetime' },],
                    [
                      {
                        dataKey: "PaymentMethod",
                        data: [],
                        title: "支付方式",
                        field: "pay_type",
                        type: "select",
                      },
                      {
                        field: 'type',
                        title: '产品类型',
                        type: 'cascader',
                        dataKey: 'tree_protype',
                        data: [],
                      },
                    ],],
                columns: [  {field:'createDate',title:'创建时间',type:'datetime',width:200,align:'left',sortable:true},
                       {field:'title',title:'商品名称',type:'string',width:200,align:'left',sortable:true},
                       {field:'type', title: '产品类型', type: 'string',width: 120, require: true, align: 'left',show: true },
                       {field:'order_number',title:'订单号',type:'string',width:220,align:'left'},
                       {field:'ticketsCode',title:'取票码',type:'string',width:120,align:'left'},
                       {field:'childrenNumber',title:'订单子项单号',type:'string',width:220,align:'left'},
                       {field:'pmsconfirmationNo',title:'PMS确认号',type:'string',width:120,align:'left'},
                       {field:'bookingName',title:'预订人姓名',type:'string',width:180,align:'left'},
                       {field:'bookingPhone',title:'预订手机号',type:'string',width:160,align:'left'},
                       {
                        field: "pay_type",
                        title: "支付方式",
                        type: "bigint",
                        bind: { key: "PaymentMethod", data: [] },
                        width: 80,
                        require: true,
                        align: "left",
                      },
                       {field:'name',title:'姓名',type:'string',width:120,align:'left'},
                       {field:'phone',title:'电话',type:'string',width:160,align:'left'},
                       {field:'settlement_price',title:'单价',type:'decimal',width:90,align:'left'},
                       {field:'num',title:'购买数量',type:'int',width:80,align:'left'},
                       {field:'settlement_total_fee',title:'合计金额',type:'decimal',width:160,align:'left'},
                       {field:'playStartDate',title:'游玩开始时间',type:'datetime',width:200,align:'left',sortable:true},
                       {field:'playEndDate',title:'游玩结束时间',type:'datetime',width:200,align:'left',sortable:true},
                       {field:'external_order_number1',title:'外部订单号',type:'string',width:220,align:'left'},
                       {field:'refundOfTime',title:'退款申请时间',type:'datetime',width:220,align:'left',sortable:true},
                       {field:'refundTime',title:'退款时间',type:'datetime',width:220,align:'left',sortable:true},

                    //    {field:'spare4',title:'退款原因',type:'string',width:220,align:'left'},
                       {field:'id',title:'主键',type:'string',width:20,hidden:true,require:true,align:'left'},
                       {field:'status',title:'票状态',type:'bigint',bind:{ key:'order_shop',data:[]},width:80,require:true,align:'left'},
                    //    {field:'supplierName',title:'供应商名称',type:'string',width:120,align:'left'},
                       {field:'supplierCode',title:'供应商名称',type:'string', bind: { key: 'mall_supplier', data: [] },width:120,align:'left'},
                       {field:'distributorCode',title:'分销商名称',type:'string',bind:{ key:'distributor_name',data:[]},width:120,align:'left'},
                       {field:'takeTime',title:'使用日期',type:'datetime',width:220,align:'left',sortable:true},],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
